﻿using Edu.Entitys;
using Edu.Utilities;
using Microsoft.AspNetCore.Mvc.Rendering;
using System;
using System.Collections.Generic;

namespace Edu.Pages.StudyTask
{
    public static class StudyTaskConst
    {


        public static List<SelectListItem> StatusList { get; set; } = new List<SelectListItem>();
        public static List<SelectListItem> YearList { get; set; } = new List<SelectListItem>();

        public static List<SelectListItem> QuarterList { get; set; } = new List<SelectListItem>
        {
            new SelectListItem { Value = "1", Text = "1"},
            new SelectListItem { Value = "2", Text = "2"},
            new SelectListItem { Value = "3", Text = "3"},
            new SelectListItem { Value = "4", Text = "4"}
        };



        static StudyTaskConst()
        {
            var now = DateTimeOffset.UtcNow;

            for (int i = 0; i < 10; i++)
            {
                var year = now.Year + i;
                YearList.Add(new SelectListItem()
                {
                    Value = year.ToString(),
                    Text = year.ToString()
                });
            }

            StatusList = EnumEx.ToSelectList<StudyTaskStatus>();
        }


    }
}
